﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="list_users.aspx.cs" Inherits="users_list_users" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
<%@ Register assembly="DevExpress.Web.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v10.1, Version=10.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>List users</title>
    <link href="../styles/style.css" rel="stylesheet" type="text/css" />
   <link type="text/css" href="../css/smoothness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
   <script src="../js/jquery-1.5.min.js" type="text/javascript"></script>
   <script src="../js/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>
   <script type="text/javascript">
       $(function() {
           $("input[id$=txtNgayNhanViec]").datepicker({
               yearRange: "10:10",
               dateFormat: 'dd-mm-yy',
               changeMonth: true,
               changeYear: true
           });

          
       });

       
    </script>
</head>
<body>
      <form id="form1" runat="server">

    <div class="wrapper">
       <div id="header">
		<h1 class="logo">
        <a href="index.aspx">
        	<img src="../images/logo.png" width="280" height="46" border="0" /></a>
        
        </h1>
        <div class="login_zone" >
            Username:<asp:Literal ID="lUsername" Text="" runat="server" />
            <br />
             <asp:LinkButton ID="lnkLogout" runat="server" Text="Logout" 
                    onclick="lnkLogout_Click" /> | <a href="login/change_pass.aspx">Change password</a>
            </div>
        </div>

     <div id="nav">
      <div style="margin-bottom:20px;width:300px;float:left;">
              <ul class="breadcrumb">
        <li>
            <a href="../index.aspx" title="Home">
         
                 <img src="../images/home.png" width="24" height="23" border="0" align="left" style="margin-top:2px;" class="home" />
      
            </a>
              
            </li>
            <li>
            <a href="index.aspx"   title="homepage">
                Trang chủ
                </a>
            </li>
        <li>
            
                Danh sách users
            
       </li>
       
     </ul>
     </div>

        </div>
              <div class="clear"></div>
        <div class="main_content">
            <div style="margin-top:-8px;">
                <img src="../images/list_users.jpg" width="900" height="77" border="0" />
            </div>
      
                                
            <ajaxtoolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
            </ajaxtoolkit:ToolkitScriptManager>
      
                                
                  <br />
                <table width="94%" align="center" class="class_table" >
                                    
                    <tr>
                        <td align="left" style="padding-bottom:4px;">Phòng ban:</td>
                        
                        
                        <td align="left" valign="middle">
                            <ajaxToolkit:ComboBox ID="cbPhongBan" runat="server" AppendDataBoundItems="True" 
                                AutoCompleteMode="SuggestAppend" BorderStyle="Solid" BorderWidth="1px" 
                                Height="24px" MaxLength="0" TabIndex="7" Width="200px">
                            </ajaxToolkit:ComboBox>
                        </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Fullname:</td>
                        
                        
                        <td align="left"><strong>
                            <asp:TextBox ID="txtFullname" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            &nbsp;</strong>Ngày nhận việc: 
                            <strong>
                            <asp:TextBox ID="txtNgayNhanViec" runat="server" CssClass="box" Width="80px"></asp:TextBox>
                            </strong> 
                            </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Username:</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtUserName" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Password</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtPassword" runat="server" CssClass="box" Width="313px" TextMode="Password"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Retype password</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtRetypePassword" runat="server" CssClass="box" Width="313px" TextMode="Password"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Email:</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtEmail" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong></td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left" >Group user</td>
                        
                        
                        <td align="left">
                            <ajaxToolkit:ComboBox ID="cbGroupUser" runat="server" AppendDataBoundItems="True" 
                                AutoCompleteMode="SuggestAppend" BorderStyle="Solid" BorderWidth="1px" 
                                Height="24px" MaxLength="0" TabIndex="7" Width="200px">
                            </ajaxToolkit:ComboBox>
                        </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left" >Note:</td>
                        
                        
                        <td align="left">
                            <strong>
                            <asp:TextBox ID="txtNote" runat="server" CssClass="box" Width="313px"></asp:TextBox>
                            </strong>
                        </td>
                        
                        
                    </tr>
                
                
                    <tr>
                        <td align="left">Active:</td>
                        
                        
                        <td align="left">
                            <asp:CheckBox ID="chkActive" runat="server"/>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnAdd" runat="server" CssClass="button white" 
                                Text="Add" Width="80px" onclick="btnAdd_Click" />
                        </td>
                        
                        
                    </tr>
                
                
                    </table>
              <div align="center">
              <br />
                  <dx:ASPxGridView ID="gridViewUsers" runat="server" AutoGenerateColumns="False" 
                      KeyFieldName="userid" onrowcommand="gridViewUsers_RowCommand1">
                      <Columns>
                          <dx:GridViewDataTextColumn Caption="id" Visible="False" VisibleIndex="0">
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Operator" VisibleIndex="1" Width="80px">
                            
                         <DataItemTemplate>
                         
                         </asp:LinkButton>
                                  
                                  <asp:LinkButton 
                                 runat="server" 
                                 ID="btnEdit" 
                                 Text='Edit'                             
                                 CommandName="Sua"
                              > </asp:LinkButton>
                              
                                <asp:LinkButton 
                                 runat="server" 
                                 ID="btnDelete" 
                                 Text='Delete'                             
                                 CommandName="Xoa">
                                  
                           
                                  
                                  </asp:LinkButton>
                         </DataItemTemplate>     
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Họ tên" VisibleIndex="1" Width="180px" 
                              FieldName="fullname" >
                              <CellStyle HorizontalAlign="Left">
                              </CellStyle>
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Group user" VisibleIndex="2" Width="110px" 
                              FieldName="groupname">
                              <CellStyle HorizontalAlign="Left">
                              </CellStyle>
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Email" VisibleIndex="4" Width="220px" 
                              FieldName="email">
                              <CellStyle HorizontalAlign="Left">
                              </CellStyle>
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Username" VisibleIndex="3" Width="120px" 
                              FieldName="username">
                              <CellStyle HorizontalAlign="Left">
                              </CellStyle>
                          </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn Caption="Date register" VisibleIndex="4" 
                              Width="100px" FieldName="date_created">
                                <PropertiesTextEdit DisplayFormatString="dd-MM-yyyy">
                           </PropertiesTextEdit>
                                <CellStyle HorizontalAlign="Center">
                                </CellStyle>
                          </dx:GridViewDataTextColumn>
                      </Columns>
                  </dx:ASPxGridView>
                
                
        
              </div>
              <div>
                        
                           

            <dx1:ASPxPopupControl ID="msgBox" 
            runat="server"
            PopupHorizontalAlign="WindowCenter"
                 PopupVerticalAlign="WindowCenter" 
                 Height="119px" Width="380px" HeaderText="Info"
            >
                <ContentCollection>
<dx1:popupcontrolcontentcontrol runat="server">
    <table style="width:100%;">
        <tr>
            <td>
                      <div style="float:left;margin-left:10px;width:34px;">
                 <img alt="" src="../images/msgbox_icon.png" />
                </div>
                 <div style="float:left;margin-left:10px;height:24px; margin-top:10px; font-size:12px;">
                 <dx:aspxlabel ID="lMessage" 
                     runat="server">
                 </dx:aspxlabel>
                 </div></td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                 <asp:Button ID="btnOK" runat="server" CssClass="button white" Font-Size="9pt" 
                       Text="OK" Width="63px" OnClick="btnOK_Click" /> </td>
        </tr>
    </table>
                    </dx1:popupcontrolcontentcontrol>
</ContentCollection>
                <HeaderStyle HorizontalAlign="Left" />
            </dx1:ASPxPopupControl>
              </div>
            
        </div>
        <div id="footer" style="float:right;">
        	<p>
            	IT Dev 2011<br />
                Version beta
                
                
            </p>
        
        </div>
        
	</div>    
    </form>
</body>
</html>
